<template>
    <view>
        <view class="no_coupons" v-if="score == null || score == ''">
            <view class="noe_coupons_img">
                <image mode="aspectFit" src="https://yunkeososyunchuc.bc8t.cn/ymq_canyino2o/static/list.png"></image>
                您暂无相关交易明细
            </view>
        </view>
        <view v-else>
            <view class="integral" v-for="(item, index) in score" :key="index">
                <view class="integral-left">
                    <view>{{ item.note }}</view>
                    <view>{{ item.time }}</view>
                </view>

                <view class="integral-right">
                    <text style="color: #6ac20b" v-if="item.type == 1">
                        +{{ item.money }}
                        <text class="integral-right1">元</text>
                    </text>
                    <text style="color: #f44444" v-if="item.type == 2">
                        -{{ item.money }}
                        <text class="integral-right1">元</text>
                    </text>
                </view>
            </view>
            <view class="mygd">没有更多了哦~</view>
        </view>
    </view>
</template>

<script>
import cardlist from '@/ymq_canyino2o/dist/cardlist/index';
import gettel from '@/ymq_canyino2o/dist/gettel/index';
var app = getApp();
export default {
    components: {
        cardlist,
        gettel
    },
    data() {
        return {
            score: ''
        };
    },
    onLoad: function (n) {
        uni.hideShareMenu({});
        app.globalData.setNavigationBarColor(this);
        var that = this;
        var o = uni.getStorageSync('users').id;
        app.globalData.util.request({
            url: 'entry/wxapp/Qbmx',
            cachetime: '0',
            data: {
                user_id: o
            },
            success: function (n) {
                console.log(n);
                that.setData({
                    score: n.data
                });
            }
        });
    },
    onReady: function () {},
    onShow: function () {},
    onHide: function () {},
    onUnload: function () {},
    onPullDownRefresh: function () {},
    onReachBottom: function () {},
    onShareAppMessage: function () {},
    methods: {
        tzjfsc: function () {
            uni.redirectTo({
                url: '../integral/integral'
            });
        }
    }
};
</script>
<style>
@import './walletmx.css';
</style>
